from PyQt5 import QtCore, QtGui, QtWidgets
from PyQt5.QtCore import Qt, QRect, QSize
from PyQt5.QtWidgets import QFrame, QHBoxLayout, QApplication
from PyQt5.QtGui import QIcon, QFont, QPainter, QColor, QImage, QBrush

import sys

import mainWindow as main_window

QSS = "./ui/qss/MaterialDark.qss"
APP = QtWidgets.QApplication(sys.argv)
MAINWINDOW = QtWidgets.QMainWindow()
UI = main_window.Ui_MainWindow()
UI.setupUi(MAINWINDOW)
with open(QSS, "r") as f:
    APP.setStyleSheet(f.read())

def theme_init():
    UI.tabWidget.setTabIcon(0, QIcon(":/icons/camera_l.svg"))
    UI.tabWidget.setTabIcon(1, QIcon(":/icons/WIFI_l.svg"))
    UI.tabWidget.setTabIcon(2, QIcon(":/icons/settings_l.svg"))
    UI.tabWidget.setTabIcon(3, QIcon(":/icons/photos_l.svg"))



def bind_methods():
    ...

def at_exit(*args):
    ...

def main():
    theme_init()
    bind_methods()
    MAINWINDOW.closeEvent = at_exit
    MAINWINDOW.show()
    sys.exit(APP.exec_())

if __name__ == '__main__':
    main()